package Arrays;

/**
 * 作者:hfj
 * 功能:344.反转字符串
 * 日期: 2025/11/13 10:41
 */
public class ReverseString {

    public static void main(String[] args) {

    }

    public static void reverseString(char[] s) {

        for (int i = 0,j = s .length -1; i < s.length / 2; i++,j--) {
            char temp = s[i];
            s[i] = s[j];
            s[j] = temp;
        }
    }
}
